#include<iostream>
using namespace std;
#include<fstream>
#include<string>
void main()
{
	int a;
	string istr;
	char op1[6],op2[6],op3[6],op4[6];
	ifstream op;
	op.open("12.txt");
	op>>op1;
	op>>op2;
	op>>op3;
	op>>op4;
	op.close();
	cout<<op1<<endl;
	cout<<op2<<endl;
	cout<<op3<<endl;
	cout<<op4<<endl;
	
	/// now have to write in binary
	///cout<<op1[0]<<op1[1]<<endl;
	
	string add="ADD";
	string sub="SUB";

	//ops
	//string 

	if(add.compare(op1)==0)
	{
		cout<<"add"<<endl;
		istr.append("00001");
		
	}
	else if(sub.compare(op1)==0)
	{
		cout<<"sub"<<endl;
		istr.append("00010");
	}

	//check operants
	string r1="r1",r2="r2",r3="r3";
	//for op2


	if(r1.compare(op2)==0)
	{
		istr.append("0001");
	}
	else if(r2.compare(op2)==0);
	{
		istr.append("0010");
	}
	else if(r3.compare(op2)==0);
	{
		istr.append("0011");
	}

	//must convert in to binary string


	ofstream out;
	out.open("bin.txt");
	out<<istr;
	out.close();


	
	
	
	
	
	
	cin>>a;
}